package test;

import com.jiang.pojo.User;
import com.jiang.service.UserService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author jiangjingbo
 * @version V1.0
 * @Project java2203
 * @Package test
 * @Description:
 * @Date 2022/6/7 1:05
 */
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:applicationContext.xml")
public class test2 {
    @Resource(name="service2")
private UserService userService;

    @Test
    public void name() {

        List<User> all = userService.findALL();
        System.out.println(all);
//        ClassPathXmlApplicationContext classPathXml = new ClassPathXmlApplicationContext();
//        classPathXml.getBean("")
    }
}
